<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社交网站常用导航样式展示</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        :root {
            --primary: #4f46e5;
            --primary-light: #818cf8;
            --primary-dark: #3730a3;
            --secondary: #10b981;
            --dark: #1e293b;
            --light: #f8fafc;
            --gray: #64748b;
            --light-gray: #e2e8f0;
            --danger: #ef4444;
            --warning: #f59e0b;
            --transition: all 0.25s ease;
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: #f1f5f9;
            line-height: 1.6;
            padding: 30px 0;
        }
        
        .page-title {
            text-align: center;
            margin-bottom: 40px;
            color: var(--dark);
        }
        
        .nav-card {
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            margin-bottom: 30px;
            overflow: hidden;
        }
        
        .nav-header {
            padding: 15px 20px;
            background-color: var(--primary);
            color: white;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .nav-content {
            padding: 20px;
        }
        
        .nav-description {
            padding: 15px 20px;
            background-color: #f8fafc;
            border-top: 1px solid var(--light-gray);
            font-size: 0.9rem;
            color: var(--gray);
        }
        
        /* 导航样式 */
        .nav-item {
            transition: var(--transition);
        }
        
        .nav-link {
            display: flex;
            align-items: center;
            gap: 8px;
            transition: var(--transition);
        }
        
        .nav-link i {
            width: 20px;
            text-align: center;
        }
        
        /* 顶部导航 */
        .top-nav {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        /* 侧边导航 */
        .side-nav {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--light-gray);
        }
        
        .side-nav .nav-link {
            padding: 10px 15px;
            color: var(--dark);
        }
        
        .side-nav .nav-link:hover,
        .side-nav .nav-link.active {
            color: var(--primary);
            background-color: rgba(79, 70, 229, 0.05);
        }
        
        /* 卡片式导航 */
        .card-nav {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
        }
        
        .card-nav-item {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--light-gray);
            padding: 15px;
            text-align: center;
            transition: var(--transition);
        }
        
        .card-nav-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            border-color: var(--primary-light);
        }
        
        .card-nav-item i {
            font-size: 1.5rem;
            color: var(--primary);
            margin-bottom: 8px;
        }
        
        .card-nav-item span {
            font-size: 0.9rem;
            display: block;
        }
        
        /* 标签式导航 */
        .tab-nav .nav-link {
            color: var(--gray);
            border-radius: 0;
            padding: 12px 20px;
        }
        
        .tab-nav .nav-link.active {
            color: var(--primary);
            border-bottom: 3px solid var(--primary);
            background-color: transparent;
        }
        
        /* 移动端底部导航 */
        .mobile-nav-container {
            max-width: 375px;
            margin: 0 auto;
            border: 1px solid var(--light-gray);
            border-radius: 20px;
            overflow: hidden;
            position: relative;
        }
        
        .mobile-content {
            height: 400px;
            padding: 15px;
            overflow-y: auto;
        }
        
        .bottom-nav {
            display: flex;
            background-color: white;
            border-top: 1px solid var(--light-gray);
        }
        
        .bottom-nav .nav-link {
            flex: 1;
            padding: 12px 0;
            color: var(--gray);
            flex-direction: column;
            text-align: center;
            font-size: 0.8rem;
        }
        
        .bottom-nav .nav-link i {
            font-size: 1.2rem;
            margin-bottom: 5px;
        }
        
        .bottom-nav .nav-link.active {
            color: var(--primary);
        }
        
        /* 通知徽章 */
        .badge-dot {
            position: relative;
        }
        
        .badge-dot::after {
            content: '';
            position: absolute;
            top: 5px;
            right: 5px;
            width: 8px;
            height: 8px;
            background-color: var(--danger);
            border-radius: 50%;
        }
        
        .badge-number {
            position: relative;
        }
        
        .badge-number .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            font-size: 0.7rem;
            padding: 2px 5px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="page-title">社交网站常用导航样式展示</h1>
        
        <!-- 1. 顶部主导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-window-maximize"></i>
                <span>顶部主导航</span>
            </div>
            <div class="nav-content">
                <nav class="navbar navbar-expand-lg top-nav">
                    <div class="container-fluid">
                        <a class="navbar-brand d-flex align-items-center gap-2" href="#">
                            <i class="fas fa-connectdevelop"></i>
                            <span>社交圈</span>
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="mainNav">
                            <ul class="navbar-nav me-auto">
                                <li class="nav-item">
                                    <a class="nav-link active" href="#">
                                        <i class="fas fa-home"></i> 首页
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#">
                                        <i class="fas fa-user-friends"></i> 好友
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#">
                                        <i class="fas fa-compass"></i> 发现
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#">
                                        <i class="fas fa-th-large"></i> 群组
                                    </a>
                                </li>
                            </ul>
                            <ul class="navbar-nav gap-2">
                                <li class="nav-item">
                                    <a class="nav-link badge-number" href="#">
                                        <i class="fas fa-bell"></i>
                                        <span class="badge bg-danger">3</span>
                                    </a>
                                </li>
                                <li class="nav-item dropdown">
                                    <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
                                        <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="rounded-circle" width="32" height="32">
                                    </a>
                                    <ul class="dropdown-menu dropdown-menu-end">
                                        <li><a class="dropdown-item" href="#">个人主页</a></li>
                                        <li><a class="dropdown-item" href="#">设置</a></li>
                                        <li><hr class="dropdown-divider"></li>
                                        <li><a class="dropdown-item" href="#">退出</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                </nav>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于大多数社交网站的桌面端主页，提供主要功能入口和用户信息访问。</p>
                <p><strong>特点：</strong> 包含品牌标识、核心功能导航、通知中心和用户菜单；响应式设计，移动端转为汉堡菜单。</p>
            </div>
        </div>
        
        <!-- 2. 侧边栏导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-columns"></i>
                <span>侧边栏导航</span>
            </div>
            <div class="nav-content">
                <div class="row">
                    <div class="col-md-3">
                        <ul class="nav flex-column side-nav">
                            <li class="nav-item">
                                <a class="nav-link active" href="#">
                                    <i class="fas fa-home"></i> 首页
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-user"></i> 个人资料
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-users"></i> 好友列表
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link badge-number" href="#">
                                    <i class="fas fa-comment"></i> 消息
                                    <span class="badge bg-primary">5</span>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-bookmark"></i> 收藏
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-calendar"></i> 活动
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-cog"></i> 设置
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div class="col-md-9">
                        <div class="bg-light p-4 rounded h-100">
                            <h5>主内容区域</h5>
                            <p>侧边栏导航配合的主内容展示区域，适合内容丰富的社交平台布局。</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于内容丰富的社交平台，如论坛、社区等需要提供较多功能入口的网站。</p>
                <p><strong>特点：</strong> 提供充足的导航空间，可展示更多功能选项；与主内容区域形成清晰的视觉分离；支持徽章显示未读信息。</p>
            </div>
        </div>
        
        <!-- 3. 卡片式导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-th"></i>
                <span>卡片式导航</span>
            </div>
            <div class="nav-content">
                <div class="card-nav">
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-home"></i>
                        <span>首页</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-user-friends"></i>
                        <span>好友</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-images"></i>
                        <span>相册</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-video"></i>
                        <span>视频</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-calendar-alt"></i>
                        <span>活动</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-shopping-bag"></i>
                        <span>商城</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-gamepad"></i>
                        <span>游戏</span>
                    </a>
                    <a href="#" class="card-nav-item">
                        <i class="fas fa-ellipsis-h"></i>
                        <span>更多</span>
                    </a>
                </div>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于社交平台的"发现"或"应用中心"页面，展示丰富的功能入口。</p>
                <p><strong>特点：</strong> 视觉冲击力强，易于识别；图标与文字结合，提升可用性；支持网格布局，扩展性好。</p>
            </div>
        </div>
        
        <!-- 4. 标签式导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-tags"></i>
                <span>标签式导航</span>
            </div>
            <div class="nav-content">
                <ul class="nav nav-tabs tab-nav">
                    <li class="nav-item">
                        <a class="nav-link active" href="#">
                            <i class="fas fa-fire-alt"></i> 热门
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-clock"></i> 最新
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-star"></i> 推荐
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-eye"></i> 关注
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-bookmark"></i> 收藏
                        </a>
                    </li>
                </ul>
                
                <div class="p-4 border border-top-0 rounded-bottom">
                    <p>标签式导航对应的内容展示区域，根据选择的标签显示不同类别的内容。</p>
                </div>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于社交平台的内容聚合页面，如信息流、动态列表等需要分类展示的内容。</p>
                <p><strong>特点：</strong> 轻量简洁，切换便捷；视觉焦点明确；适合展示内容分类或筛选选项。</p>
            </div>
        </div>
        
        <!-- 5. 移动端底部导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-mobile-alt"></i>
                <span>移动端底部导航</span>
            </div>
            <div class="nav-content">
                <div class="mobile-nav-container">
                    <div class="mobile-content">
                        <h5 class="mb-3">移动端内容区</h5>
                        <p>这是移动端社交应用的主内容展示区域，底部导航固定在屏幕底部，方便用户单手操作。</p>
                        <p class="text-muted">向下滚动查看更多内容...</p>
                    </div>
                    <nav class="bottom-nav">
                        <a class="nav-link active" href="#">
                            <i class="fas fa-home"></i>
                            <span>首页</span>
                        </a>
                        <a class="nav-link" href="#">
                            <i class="fas fa-compass"></i>
                            <span>发现</span>
                        </a>
                        <a class="nav-link" href="#">
                            <i class="fas fa-plus-circle fa-lg"></i>
                        </a>
                        <a class="nav-link badge-dot" href="#">
                            <i class="fas fa-bell"></i>
                            <span>通知</span>
                        </a>
                        <a class="nav-link" href="#">
                            <i class="fas fa-user"></i>
                            <span>我的</span>
                        </a>
                    </nav>
                </div>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于社交应用的移动端界面，特别是需要用户频繁切换主要功能的场景。</p>
                <p><strong>特点：</strong> 固定在屏幕底部，适合单手操作；中间按钮通常为主要操作（如发布内容）；支持未读消息提示。</p>
            </div>
        </div>
        
        <!-- 6. 个人中心导航 -->
        <div class="nav-card">
            <div class="nav-header">
                <i class="fas fa-user-circle"></i>
                <span>个人中心导航</span>
            </div>
            <div class="nav-content">
                <div class="row">
                    <div class="col-md-3 text-center">
                        <img src="https://picsum.photos/id/64/120/120" alt="用户头像" class="rounded-circle mb-3" width="120" height="120">
                        <h4>李小明</h4>
                        <p class="text-muted">@xiaoming</p>
                        <button class="btn btn-sm btn-primary mt-2">编辑资料</button>
                    </div>
                    <div class="col-md-9">
                        <ul class="nav flex-column side-nav h-100">
                            <li class="nav-item">
                                <a class="nav-link active" href="#">
                                    <i class="fas fa-user"></i> 个人主页
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-images"></i> 我的相册
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-comment"></i> 我的动态
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-heart"></i> 我的收藏
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-users"></i> 我的好友
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">
                                    <i class="fas fa-cog"></i> 账号设置
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link text-danger" href="#">
                                    <i class="fas fa-sign-out-alt"></i> 退出登录
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="nav-description">
                <p><strong>应用场景：</strong> 适用于社交平台的个人中心页面，集中展示与用户相关的功能和信息。</p>
                <p><strong>特点：</strong> 与用户信息紧密结合；突出个人相关功能；视觉层次清晰，易于找到所需功能。</p>
            </div>
        </div>
    </div>

    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 导航交互效果
        document.querySelectorAll('.nav-link').forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                
                // 移除同组中其他链接的active类
                const parentNav = this.closest('.nav');
                if (parentNav) {
                    parentNav.querySelectorAll('.nav-link').forEach(item => {
                        item.classList.remove('active');
                    });
                }
                
                // 给当前点击的链接添加active类
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>
    
